luci-base: fix table option does not show in non-Bootstrap themes when it has depends
authorJoseph Mory <[email protected]>
Fri, 30 May 2025 12:32:47 +0000 (20:32 +0800)
committerPaul Donald <[email protected]>
Mon, 2 Jun 2025 19:01:49 +0000 (22:01 +0300)
Signed-off-by: Joseph Mory <[email protected]>
modules/luci-base/htdocs/luci-static/resources/form.js

index 4c7cbce69d501204b7c823c04ae81d238ab9d0ff..f65d25e91aa9e0a8d166bfeda658470b7aa9778d 100644 (file)
@@ -3779,7 +3779,10 @@ const CBIValue = CBIAbstractValue.extend(/** @lends LuCI.form.Value.prototype */
                                E('div', { 'class': 'cbi-value-description' }, this.description.trim()));
 
                if (depend_list && depend_list.length)
-                       optionEl.classList.add('hidden');
+                       if (in_table)
+                               optionEl.firstChild.classList.add('hidden');
+                       else
+                               optionEl.classList.add('hidden');
 
                optionEl.addEventListener('widget-change',
                        L.bind(this.map.checkDepends, this.map));